<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>我的订单</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/renting/css/public.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/renting/css/layui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/lib/layui-v2.6.3/css/layui.css" media="all"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/renting/css/header.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/renting/css/bottom.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/renting/css/tenant_public.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/renting/css/tenant_payment.css"/>
</head>
<body>
<div class="header">
    <div class="nav">
        <a href="${pageContext.request.contextPath}/renting/index.jsp" class="nav_title">好客租房</a>
        <select class="select">
            <option value="重庆">重庆</option>
            <option value="贵阳">贵阳</option>
            <option value="重庆">重庆</option>
            <option value="贵阳">贵阳</option>
        </select>
        <ul class="nav_ul">
            <li><a href="${pageContext.request.contextPath}/renting/index.jsp">首页</a></li>
            <li><a href="${pageContext.request.contextPath}/renting/pages/onther/Findroom.jsp">轻松找房</a></li>
            <li><a href="${pageContext.request.contextPath}/renting/pages/onther/entry.jsp">房东入驻</a></li>
            <li><a href="${pageContext.request.contextPath}/renting/pages/onther/chat_news.jsp">消息</a></li>
            <li><a href="${pageContext.request.contextPath}/renting/pages/onther/login.jsp" style="color: #2981c8;">登录</a></li>
        </ul>
        <img src="${pageContext.request.contextPath}/renting/img/icon/lianxi-1.png" class="nav_img" style="margin-top: -20px;">
        <p class="nav_phone">
            <span>13301131116</span>
            <span>13301131116</span>
        </p>
    </div>
</div>
<div class="body">
    <div class="portrait_bg">
        <div class="portrait">
            <a href="${pageContext.request.contextPath}/renting/pages/onther/personal.jsp" class="headImg">
                <img style="width: 100px;height: 100px;border-radius: 100%" src="../../img/${drom.avater}">
            </a>
        </div>
        <p class="nickname">点击头像编辑个人资料</p>
    </div>
    <div class="content">
        <ul class="left_ul">
            <li><a href="${pageContext.request.contextPath}/renting/pages/tenant/inspection.jsp"><img src="${pageContext.request.contextPath}/renting/img/xuanzhongtiao.png" >看房记录</a></li>
            <li><a href="${pageContext.request.contextPath}/renting/pages/tenant/appointment.jsp"><img src="${pageContext.request.contextPath}/renting/img/xuanzhongtiao.png" >我的预约</a></li>
            <li class="li_active"><a href="${pageContext.request.contextPath}/renting/pages/tenant/order.jsp"><img src="${pageContext.request.contextPath}/renting/img/xuanzhongtiao.png" >我的订单</a></li>
            <li><a href="${pageContext.request.contextPath}/renting/pages/tenant/collection.jsp"><img src="${pageContext.request.contextPath}/renting/img/xuanzhongtiao.png" >我的收藏</a></li>
            <li><a href="${pageContext.request.contextPath}/renting/pages/tenant/wallet.jsp"><img src="${pageContext.request.contextPath}/renting/img/xuanzhongtiao.png" >我的钱包</a></li>
            <li><a href="${pageContext.request.contextPath}/renting/pages/tenant/ID_verification.jsp"><img src="${pageContext.request.contextPath}/renting/img/xuanzhongtiao.png" >身份验证</a></li>
            <li><a href="${pageContext.request.contextPath}/renting/pages/tenant/contract.jsp"><img src="${pageContext.request.contextPath}/renting/img/xuanzhongtiao.png" >电子合同</a></li>
            <li><a href="${pageContext.request.contextPath}/renting/pages/tenant/about.jsp"><img src="${pageContext.request.contextPath}/renting/img/xuanzhongtiao.png" >联系我们</a></li>
        </ul>
        <div class="right_body">
            <div class="right_content">
                <div class="right_title">
                    <p><a href="${pageContext.request.contextPath}/renting/pages/tenant/order.jsp">我的订单</a>><a href="${pageContext.request.contextPath}/renting/pages/tenant/payment.jsp">支付</a></p>
                </div>
                <form action="${pageContext.request.contextPath}/alipay" id="frm" method="post" target="_blank">
                    <input type="hidden" name="orderId" id="orderId" value="${playShow.rid}">
                    <input type="hidden" id="price" name="price" value="${playShow.amount}">
                </form>
                <div id="d1"></div>
                <div class="right_main">

                    <div class="item">
                        <p id="order">订单号：${playShow.rid}</p>
                        <p>金额:${playShow.amount}元</p>
                        <p>选择支付方式</p>
                        <div class="my_btn">
                            <c:if test="${drom.balance>playShow.amount}">
                                <button type="button" onclick="amountPlay()" class="layui-btn">余额支付</button>
                            </c:if>
                            <c:if test="${drom.balance<playShow.amount}">
                                <button type="button" class="layui-btn layui-btn-disabled">余额不足</button>
                            </c:if>
                            <button type="button" onclick="aliPlay()"  class="layui-btn">支付宝支付</button>
                            <button type="button" class="layui-btn">微信支付</button>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <div style="clear: both;"></div>
    </div>
</div>
<div class="bottom">
    <p>沪公网安备 31011402005354号</p>
</div>
</body>
</html>
<script src="${pageContext.request.contextPath}/renting/js/jQuery-3.4.1.js"></script>
<script src="${pageContext.request.contextPath}/renting/layui.js"></script>
<script src="${pageContext.request.contextPath}/renting/js/header.js"></script>
<script type="text/javascript">
    // $(function () {
    //     let order="";
    //     for (let i = 0; i < 9; i++) {
    //         order+=Math.floor(Math.random()*9+1);
    //     }
    //     $("#order").text("订单号:"+order);
    //     $("#orderId").val(order);
    // })

    aliPlay=function (){
        $("#frm").submit();
        // var obj =$("#orderId").val();
        // var obj1=$("#price").val()
        // var txt={"orderId":obj,"price":obj1};
        // return;
        <%--$.ajax({--%>
        <%--    url:"${pageContext.request.contextPath}/alipay",--%>
        <%--    type:"post",--%>
        <%--    success:(msg)=>{--%>
        <%--    }--%>
        <%--});--%>
    }
    
    
    judge_login("${pageContext.request.contextPath}/renting/pages/tenant/inspection.jsp","${pageContext.request.contextPath}/renting/pages/onther/login.jsp");
</script>
<script src="${pageContext.request.contextPath}/renting/js/ScrollHolder.js"></script>
